#!/bin/bash


read -p "Enter name : (default is root) " username
read -p "Enter password of root user: " password
read -p "Enter new db name: " dbname

if [ ! -n "$username" ]; then
    username="root"
fi

initmysql=`
mysql -u$username -p$password<<EOF
create database $dbname default charset utf8mb4 collate utf8mb4_unicode_ci;
EOF
`
echo $initmysql